# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.CloudIdentity.V1.Model.SamlIdpConfig do
  @moduledoc """
  SAML IDP (identity provider) configuration.

  ## Attributes

  *   `changePasswordUri` (*type:* `String.t`, *default:* `nil`) - The **Change Password URL** of the identity provider. Users will be sent to this URL when changing their passwords at `myaccount.google.com`. This takes precedence over the change password URL configured at customer-level. Must use `HTTPS`.
  *   `entityId` (*type:* `String.t`, *default:* `nil`) - Required. The SAML **Entity ID** of the identity provider.
  *   `logoutRedirectUri` (*type:* `String.t`, *default:* `nil`) - The **Logout Redirect URL** (sign-out page URL) of the identity provider. When a user clicks the sign-out link on a Google page, they will be redirected to this URL. This is a pure redirect with no attached SAML `LogoutRequest` i.e. SAML single logout is not supported. Must use `HTTPS`.
  *   `singleSignOnServiceUri` (*type:* `String.t`, *default:* `nil`) - Required. The `SingleSignOnService` endpoint location (sign-in page URL) of the identity provider. This is the URL where the `AuthnRequest` will be sent. Must use `HTTPS`. Assumed to accept the `HTTP-Redirect` binding.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :changePasswordUri => String.t() | nil,
          :entityId => String.t() | nil,
          :logoutRedirectUri => String.t() | nil,
          :singleSignOnServiceUri => String.t() | nil
        }

  field(:changePasswordUri)
  field(:entityId)
  field(:logoutRedirectUri)
  field(:singleSignOnServiceUri)
end

defimpl Poison.Decoder, for: GoogleApi.CloudIdentity.V1.Model.SamlIdpConfig do
  def decode(value, options) do
    GoogleApi.CloudIdentity.V1.Model.SamlIdpConfig.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.CloudIdentity.V1.Model.SamlIdpConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
